1. Field of the Invention
The present invention relates to a method for decoding and displaying digital broadcasting signals, in particular to a method for storing the decoded picture for preventing a frame buffer conflict irrespective of location and size of a display window on the screen in decoding and displaying digital broadcasting signals.
2. Description of the Related Art
The digital television (DTV) broadcasting has started in the United States since 1998. Many efforts have been made to develop DTV sets and set-top boxes for receiving the digital television signal. Recently, an interactive set-top box has been presented, which provides communication services based on the web by displaying a small window on the television screen while a user watches a television program.
However, since the DTV set is quite expensive for general customers, there are much attentions on the development of a low price set-top boxes. PC (personal computer) add-in cards would be another economical solution for DTV viewing because a PC platform provides a powerful development environment and user interface. Using a local bus or a video signal interface, for example Video Interface Port (VIP1.1), standard definition (SD) pictures can be transmitted from a DTV reception card to a graphic card. Thus, DTV can be put together with other graphic windows on the monitor.
If the broadcasting videos are HD (High Definition) programs the HD video signals should be outputted to a graphic controller supporting a new video signal interfacing standard such as VIP 2.0. However, it is not easy to transfer the HD video signal to the graphic controller because such a high bandwidth video signal interface such as VIP2.0 is not popular yet and it causes heavy load for a local bus. Therefore, is hard to overlay the HD program within the graphic controller.
Another alternative way to view HD video on the PC monitor is to overlay the video with other graphics in the analog domain. One input of the analog overlay device is the decoded video signal from the DTV reception card and the other input comes from the graphic card with an empty window for DTV video to be displayed. Therefore, user can watch HD programs on a window in the PC monitor.
For digital video broadcasting, Advanced Television System Committee (ATSC) adopts MPEG-2 (Moving Picture Experts Group 2) video compression technology. Using MPEG-2 video compression algorithm, four to six SD programs or one HD program can be transmitted through the channel of the same bandwidth as the National Television System Committee (NTSC) specification.
One technique of MPEG-2 is to exploit a temporal redundancy to compress the video signal. Each frame can be encoded in an intra mode (I-frame), prediction mode (P-frame) or bi-directional prediction mode(B-frame). In order to decode B pictures, it is required to have at least three frame buffers; two for reference frames and one for decoded frame. FIG. 1 is a block diagram illustrating the general coding and display apparatus with three frame buffers. The apparatus might have more than three frame buffers, but it causes the increase of the material cost. For 1920×1080 pictures, one frame buffer amounts to 3.1 Mbytes.
As depicted in FIG. 1, the decoder 1 decodes DTV signals and stores the picture data in the buffer memory 2. And, the data stored in the buffer memory 2 is fetched and displayed by the display device 3.
Since there are two buffers for I or P frame, there is no buffer conflict for decoding and displaying I or P pictures simultaneously. That is, when I or P picture is decoded and displayed concurrently, the picture in one I or P buffer is being displayed, the other will be used for storing new picture.
However, there are more than two pictures in a row, say B1 and B2, one B frame buffer has to take care of both decoding and displaying pictures. In other words, B2 picture data can not be stored before B1 data has been fetched, and the fetching operation for B2 can not be performed until B2 data has been stored.
Herein, a covalent process of the B-frame buffer in the data storing and fetching operation will now be described in detail with reference to the accompanying FIG. 2 and FIG. 3.
First, FIG. 2 illustrates a timing chart for comparing the data storing time and data fetching time when displaying interlaced pictures on a interlace monitor. Also, it is assumed that the size of display window is same as the size of the whole screen.
As depicted in FIG. 2, the decoding and display process are apart by a half frame time. For B pictures, the top field of B1 picture (B1t) is displayed a half frame time after starting to decode the B1 picture, and the B2 picture starts to be decoded when the bottom field of B1 picture (B1b) is displayed.
FIG. 3 is a memory map illustrating the data storing and fetching process for the frame pictures. The top and bottom field data are stored in the order of W1.
When the top field is displayed, the top-field data (top_line(0)˜top_line(N2)) are fetched in the order of R1.R2 denotes the fetch order for displaying the bottom field.
Provided that a picture can be decoded in a frame time, the top field data will be stored before it is displayed and the bottom field data will be fetched before a new picture is stored. Accordingly, when the video is displayed on the whole screen of the monitor, a buffer memory conflict in storing and fetching data does not occur.
However, at a letter box mode of 16:9 pictures on a 4:3 monitor as shown in FIG. 4A, or at an analog overlay mode as shown in FIG. 4B,there is a T-gap or B-gap where videos are not displayed on the upper or lower portion of the screen. As the fetching time for display is shortened, the decoding time is affected.
FIG. 5A is a timing chart for illustrating the decoding and display timing when there is T-gap, i.e., the video is not displayed on the upper portion of the screen. As depicted in FIG. 5A, the decoding process for the second B picture (B2) should be delayed until the bottom field of B1 (B1b) starts to be displayed.
In addition, FIG. 5B is a timing chart for illustrating the decoding and display timing when there is B-gap, i.e., the video is not displayed on the lower portion of the screen. As depicted in FIG. 5B, the decoding process should be completed as early as the scanning time of the B-gap.
Consequently, the decoding process should be controlled so that it would not cause a frame buffer memory conflict described above.
In order to prevent the above mentioned frame buffer conflict, one additional buffer memory can be employed for the B picture or a decoder with higher performance can be integrated. But, it causes increase of the manufacturing cost.